package com.uniview.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.uniview.base.BaseDao;
import com.uniview.entity.po.ServiceOrderWarn;

@Repository("serviceOrderWarnDao")
public class ServiceOrderWarnDao extends BaseDao<ServiceOrderWarn> {

	public List<ServiceOrderWarn> findWarnsByOrderId(Integer orderId) throws Exception {
		String hql = "from ServiceOrderWarn ow where ow.orderId=" + orderId;
		return this.findByHql(hql);
	}

	public List<ServiceOrderWarn> findWarnsByHandlerNo(String handlerNo) throws Exception {
		String hql = "from ServiceOrderWarn ow where upper(ow.handlerNo)=upper('" + handlerNo + "')";
		return this.findByHql(hql);
	}
}
